<?php

class KTDSwitchCharacterForm extends KTDPlayerForm{
    public function configure(){
        $this->setWidgets(array("actual_character_id" => new sfWidgetFormChoice(array(
            'choices' => $this->getObject()->getKTDCharactersByIdPseudo()
            ))));
        $this->setValidators(array("actual_character_id" => new sfValidatorChoice(array(
            'choices' => array_keys($this->getObject()->getKTDCharactersByIdPseudo())
        ))));
        $this->widgetSchema->setNameFormat("ktd_switch_character[%s]");
    }
}